home *** CD-ROM | disk | FTP | other *** search
- /*
- * The original copyright owners of the accompanying source code files have
- * agreed to place such code into the public domain. Accordingly, anyone
- * who receives or obtains a copy of such source code is freely entitled to
- * reproduce, use and otherwise exploit such code (including the right to
- * make derivative works), at his/her own risk and expense, without any
- * obligation or liability to the original copyright owners.
- *
- * We would appreciate (but do not require) that the following message be
- * included in any derivative works:
- *
- * "Portions of this program were developed by Peter Broadwell, Rob Myers
- * and Robin Schaufler while working in Silicon Valley."
- *
- * The accompanying source code files and related documentation materials
- * are distributed on an "AS IS" basis, without any warranties or
- * guarantees of any kind. All implied warranties, including the implied
- * warranties of merchantability and of fitness for any particular purpose,
- * are expressly disclaimed.
- */
- /*
- * typedefs for classes and their instances
- */
-
-
- typedef char *ptrCharFcn(); /* function returning ptr to char */
- typedef ptrCharFcn *classFcn; /* ptr to fcn returning ptr to char */
-
- /*
- * function table entry description
- */
- typedef struct fTable_ {
- int selector; /* selector code for this function */
- ptrCharFcn *function; /* name of the function */
- } fcnTable;
-
-
- /*
- * super object class description
- */
- typedef struct class_ {
- struct class_ *super; /* super class */
- fcnTable *fcnTable; /* table of [token, function] ... */
- int instSize; /* size of an object of this class */
- int classId; /* class of object */
- } class;
-
- /*
- * object description
- */
- typedef struct inst_ {
- class *myClass; /* super object class pointer */
- /* derive classFcns, nFcns from myclass and its supers */
- classFcn *classFcns; /* pointer to base of class function array */
- int nFcns; /* number of class functions in array */
- } inst;
-
- /*
- * declaration of object's message passing function (under VSM)
- */
- char *Msg( /* inst *receiver, int selector,
- int type, char *arg */ );
-
- #define EOTABLE -1,0
- #ifndef NULL
- # define NULL 0
- #endif
- #define NOARG 0
- #define INSTARG 4
- #define INTARG 4
- #define HITARG 4
- #define INT -4
- #define PTR -4
-